<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','调度管理','参数配置']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header s_page_title">
			<h1 class="page_detail_title">参数配置</h1>
		</div>
		<div class="row" style="margin-top:5px;">
			<div class="col-xs-12">
				<form  name="userForm" id="schedulingForm" class="form-horizontal"  novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">起始时间</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="repairStartDate" autocomplete="off" [(ngModel)]='config.repairStartDate' id="repairStartDate" placeholder="起始时间" />
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">清除历史数据</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<textarea class="form-control" name="remHistoryData" [(ngModel)]='config.remHistoryData' placeholder="json格式"></textarea>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">清除参数数据</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<textarea class="form-control" name="remParamData" [(ngModel)]='config.remParamData' placeholder="json格式"></textarea>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">主参数</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<textarea class="form-control" name="mainParam" [(ngModel)]='config.mainParam' placeholder="json格式"></textarea>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">个体参数</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<button type="button" (click)='singleParamConfig(configModal)' class="btn btn-primary">配置</button>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">指定公司ID</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="appointCompanyId" type="text" [(ngModel)]='config.appointCompanyId' placeholder="逗号分隔" />
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">指定设备ID</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="appointDeviceId" type="text" [(ngModel)]='config.appointDeviceId' placeholder="逗号分隔" />
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">过滤设备ID</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="filterDeviceId" type="text" [(ngModel)]='config.filterDeviceId' placeholder="逗号分隔" />
							</div>
						</div>
					</div>
					<div class="center">
						<button type="button" (click)='submitParam()' class="btn btn-primary">保存</button>
						<button type="button" (click)='resetRemHistoryData()' class="btn btn-primary">历史数据清零</button>
						<!--<button type="button" (click)='resetRemParamData()' class="btn btn-primary">参数数据清零</button>-->
						<button type="button" (click)='goBack()' class="btn default">返回</button>
					</div>
				</form>
				<div class="hr hr-dotted"></div>
			</div>
		</div>
	</div>
</div>


<!-- 添加、编辑参数 弹窗-->
<section bsModal #singleModal="bs-modal" style="z-index: 2000;" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" (click)="singleParamCancel(singleModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>     
				<h4 class="modal-title">{{singleType}}参数</h4>
			</div>
				<div class="modal-body">
					<div class="row form-horizontal">
						<div class="form-group col-xs-12">
							<label class="blue control-label col-xs-2">设备ID</label>
							<div class="col-xs-10" >
							    <input type="text" class="form-control" [(ngModel)]='single.deviceId' name='deviceId'/>
							</div>
						</div>
						<div class="form-group col-xs-12">
							<label class="blue control-label col-xs-2">车牌号</label>
							<div class="col-xs-10" >
							    <input  class="form-control" type="text" [(ngModel)]='single.carNumber' name='carNumber'/>
							</div>
						</div>
						<div class="form-group col-xs-12">
							<label class="blue col-xs-2 control-label">参数</label>
							<div class="col-xs-10">
								<textarea class="form-control" type="text" [(ngModel)]='single.param' name='param'></textarea>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" (click)="singleParamCancel(singleModal)">取消</button>
					<button type="button" class="btn btn-primary" (click)="singleParamSubmit(singleModal)">确认</button>
				</div>
		</div>
	</div>
</section>

<!-- 添加、编辑参数 弹窗-->
	
<!-- 参数配置 弹窗-->
<section bsModal #configModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" (click)="configCancel(configModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>     
				<h4 class="modal-title">参数配置</h4>
			</div>
				<div class="modal-body">
					<div class="row form-horizontal">
						<div class="paramHeader">
							<span class="cell">车牌号</span>
							<span class="cell">设备ID</span>
							<span class="cell">参数</span>
							<span class="cell">操作</span>
						</div>
						<div class="paramBody">
							<p *ngIf='paramConfigData.length == 0' class="emptyData">暂无数据</p>
							<ul class="vesion">
								<li *ngFor="let item of paramConfigData" class="lis">
									<span class="cell">{{item.carNumber}}</span>
									<span class="cell">{{item.deviceId}}</span>
									<span class="cell">{{item.param}}</span>
									<span class="cell">
										<button type="button" (click)='updataParam(item,singleModal,"编辑")' style="margin-right: 12px;">编辑</button>
										<button type="button" (click)='delParam(item)'>删除</button>
									</span>
								</li>
							</ul>
						</div>
						<button type="button" (click)='addParam(singleModal,"新增")' class="btn btn-primary">添加</button>
					</div>
				</div>
		</div>
	</div>
</section>

<!-- 参数配置 弹窗-->
